package com.pp.mariage.server;

/**
 * 
 * @author Pascal
 *
 */
public class Util {

	public static String generateParticipationUrl(CadeauEnum cadeau,
			Integer ongletId) {
		if (cadeau.getMontant() == null) {
			if (ParticipationService.isCadeauPris(cadeau)) {
				return "#";
			}
			return "../restricted/blocage.jsp?id=" + ongletId + "&cadeau="
					+ cadeau.getId() + "&etape=1";
		}
		return "../restricted/cadeau1.jsp?id=" + ongletId + "&cadeau="
				+ cadeau.getId() + "&etape=1";
	}

	public static String generateCadeauTitle(CadeauEnum cadeauInfo) {
		boolean cadeauPris = ParticipationService.isCadeauPris(cadeauInfo);
		if (cadeauPris) {
			return "DEJA PRIS";
		}
		return "Je m'en occupe";
	}
}
